public class class1 {
    import java.util.Calendar;

    class Thoroughbred {
        // 属性
        private Thoroughbred mother; // 母亲
        private Thoroughbred father; // 父亲
        private int birthyear;        // 出生年份

        // 构造函数
        public Thoroughbred(Thoroughbred mother, Thoroughbred father, int birthyear) {
            this.mother = mother;
            this.father = father;
            this.birthyear = birthyear;
        }

        // 操作：获取当前年龄
        public int getCurrentAge() {
            int currentYear = Calendar.getInstance().get(Calendar.YEAR);
            return currentYear - birthyear;
        }

        // 操作：获取父亲
        public Thoroughbred getFather() {
            return father;
        }

        // 操作：获取母亲
        public Thoroughbred getMother() {
            return mother;
        }
    }
}
